<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <div id="app">
    <h3>{{ title }}</h3>
    <div>
      <button @click="count--">-</button>
      <span>{{ count }}</span>
      <button @click="count++">+</button>
    </div>
  </div>
  <script src="./vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        count: 100,
        title: '计数器'
      },
      beforeCreate() {
        console.log('before..create');
      },
      created() {
        console.log('created');
      },
      beforeMount() {
        console.log('before...mount');
      },
      mounted() {
        console.log('mounted');
      },
      beforeUpdate() {
        console.log('before...update');
      },
      updated() {
        console.log('updata');
      },
      beforeDestroy() {
        console.log('before...destroy');
      },
      destroyed() {
        console.log('destroy');
      }
    })
  </script>
</body>

</html>